<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/3/14
 * Time: 15:50
 */

echo "<title>7-8 关联数组赋值</title>";
echo "<p style='text-align: center'><a href=\"index.php\"><font size=\"4\">目录</font></a></p>";
header("Content-type: text/html; charset=utf-8");
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";

//请创建一个数组变量arr,并尝试创建一个关联数组，键是apple，值是苹果

//方法一：
$arr = array();
$arr['apple']='苹果';

echo "<br />";

//方法二：

$arr=array('apple'=>'苹果');
if(isset($arr)) {print_r($arr);}

